{template 'common/header'}
<ul class="nav nav-tabs">
    <li class="active"><a href="{php echo $this->createWebUrl('request')}">兑换管理</a></li>
    <li ><a style="" onclick="return confirm('此操作可能耗时较久，确认吗？'); return false;" href="{php echo $this->createWebUrl('Downloade')}" title="导出"><i class="fa fa-download"> 导出全部数据</i></a></li>
</ul>
<style>
th{
	text-align: center !important;
}

td{
	text-align: center !important;
	white-space: normal !important;
	word-break: break-all !important;
}
</style>
<div class="panel panel-info">
        <div class="panel-heading">筛选</div>
        <div class="panel-body">
            <form action="{php echo $this->createWebUrl('request')}" method="post" class="form-horizontal">
                <div class="form-group">
                   <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label" style="width: 200px;">姓名或手机</label>
                    <div class="col-sm-2 col-lg-3">
	                    <input type="text" name="name" value="{$name}" class="form-control" style="display: inline-block;">
                    </div>
                   <button class="btn btn-default">搜索</button>
                </div>
            </form>
        </div>
</div>
<div class="panel panel-default">

	<div class="panel-body" style="text-align: center;">

        <table class="table table-hover">

            <thead class="navbar-inner">

                <tr>
                    <th style="width:50px;">编号</th>		
                    <th style="width:120px;">奖品名称</th>
                    <th>消耗积分</th>
                    <th style="width:80px;">昵称</th>
                    <th style="width:80px;">收货人</th>
                    <th style="width:100px;">收货地址</th>
                    <th>备注</th>
                    <th style="width:150px;">时间</th>	
                    <!--th style="width:100px;">截图</th-->	
                    
                    <th>操作</th>

                </tr>

            </thead>

            <tbody id="table_content">

                {loop $list $item}

                <tr>

                    <td>{$item['id']}</td>
                    <td>{$item['title']}</td>
                    <td>{$item['cost']}</td>
                    <td>{$item['from_user_realname']}</td>
                    <td>{$item['realname']}</td>
                    <td>{$item['mobile']}<br>{$item['residedist']}<br>{$item['alipay']}</td>
                    <td>{$item['note']}</td>
                    <td>{php echo date('Y-m-d H:i:s', $item['createtime'])}</td>
                    <!--td>
                    {if $item['image']<>'0' }
                    <a href="{$_W['siteroot']}attachment/{$item['image']}" target="_blank"><img src="{$_W['siteroot']}attachment/{$item['image']}" width='50' height='50'/></a></td>
                    {/if}-->
                    <td>
                       {if $item['status']=='done' }
                       <a href="###" class="btn btn-success btn-sm">已审核</a>
                       {else}
                       <a href="{php echo $this->createWebUrl('Request', array('id' => $item['id'], 'op' => 'do_goods'))}" onclick="return confirm('确认为 {$item['realname']} 兑换奖品？');return false;" class="btn btn-danger btn-sm">未审核</a>
                       {/if}
                       
						
                    	<a href="{php echo $this->createWebUrl('Request', array('id' => $item['id'], 'op' => 'delete'))}" onclick="return confirm('删除后将不可恢复，确定删除吗？')" class="btn btn-warning btn-sm">删除</a>
						
                    </td>

                </tr>
                {/loop}

            </tbody>
        
        </table>
  
     {$pager}

    </div>

</div>
{template 'common/footer'}